package com.hmdp.utils;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-02-14
 * Time: 21:11
 */
public interface ILock {

    /**
     * 尝试获取锁,如果获取锁失败,那么不在继续重试
     * 成功返回true,否则返回false
     */
    boolean tryLock(long timeoutSec);
    /**
     * 释放锁
     */
    void unlock();

}
